package api06;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入时间：");
        int time = sc.nextInt();
        while (time!=0){
            System.out.println(time);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
            }
            time--;

        }
        System.out.println("程序结束");
    }
}
